package com.itheima.Jiuye08;

import java.util.Set;
import java.util.TreeSet;

public class MyTestSet {
    public static void main(String[] args) {
        Set<Student> st = new TreeSet<>();
        Student stu = new Student("wangwu",29);
        Student stu1 = new Student("lishi",25);
        Student stu2 = new Student("zhaoliu",26);
        Student stu3 = new Student("xiaomin",25);
        Student stu4 = new Student("xiaohua",28);
        st.add(stu);
        st.add(stu1);
        st.add(stu2);
        st.add(stu3);
        st.add(stu4);
        System.out.println(st);
    }
}
